import * as THREE from 'three';
import Experience from '../class/Experience';

class CreateShape {
    height = 0.001;
    constructor(shapeArr) {
        const geometry = new THREE.ExtrudeGeometry(
            shapeArr,
            {
                depth: this.height,
                bevelEnabled: false,
            }
        )
        // const material = new THREE.MeshLambertMaterial({
        //     color: 0x3963bc,
        //     transparent: true,
        //     opacity: 1,
        // }); //材质对象
        const material = new THREE.MeshStandardMaterial({
            color: new THREE.Color('#0565f3').multiplyScalar(0.2),
            // emissive:new THREE.Color(data.color).multiplyScalar(0.2),
            roughness: 0.5,
            metalness: 0.3,
            transparent: true,
            opacity:1,
            depthWrite: true,
            // envMap:envMap,
        })
        return new THREE.Mesh(geometry, material);
    }
}

export { CreateShape }